--[[
-- Author:      feilong
-- DateTime:    2019-10-23 17:19:33
-- Description: 
--  负责与客户端保持通信
	protobuf协议解析
	根据消息id派发到指定类型节点
	
--]]

local skynet = require "skynet"
local sharedata = require("skynet.sharedata")

g.service_name = "main"

skynet.start(function()

	local server_config = dofile(skynet.getenv("server_config"))
	local node_info = server_config.node_info
	--skynet控制台
	skynet.uniqueservice("debug_console", node_info.debug_port)

	--配置服务
	local service = skynet.uniqueservice("config/config_service")
	g.Message():sendService(service, "start")
	
	
	local service = skynet.uniqueservice("watchdog/watchdog_service")
	g.Message():sendService(service, "start")

	local service = skynet.uniqueservice("manager_service")
	g.Message():sendService(service, "start")




	skynet.exit()


end)

